package service;

import dao.SellDao;
import dao.domain.Sell;
import dao.impl.SellDaoImpl;

import java.sql.SQLException;
import java.util.List;

/**
 * @author huangzhiyang
 * @Date 2023/11/7
 * @Description
 */
public class SellService {
    private static final SellDao SELL_DAO = new SellDaoImpl();

    /**
     * 查询所有数据
     *
     * @return 数据集
     * @throws SQLException 数据库异常
     */
    public static List<Sell> listSell() throws SQLException {
        return SELL_DAO.listSell();
    }

    /**
     * 储存数据
     *
     * @param sell 储存对象
     * @throws SQLException 数据库异常
     */
    public static void store(Sell sell) throws SQLException {
        SELL_DAO.store(sell);
    }
}
